package com.atguigu.yygh.hosp.controller.user;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.hosp.service.DepartmentService;
import com.atguigu.yygh.vo.hosp.DepartmentVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author :又菜又爱玩的→速趴塞亚锦←
 * @create :2023/5/18
 * @param  :1.8
 */
@RestController
@RequestMapping("/user/hosp/department")
public class UserDepartmentController {

    @Resource
    private DepartmentService departmentService;
    //科室列表医院详情信息和科室相关信息
    @GetMapping("/all/{hoscode}")
    public R findAll(@PathVariable String hoscode){
       List<DepartmentVo> departmentList= departmentService.getDepartmentList(hoscode);
       return R.ok().data("list",departmentList);
    }
}
